package com.getword.mongodao;

import com.getword.domain.ArticleCollect;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;


public interface ArticleCollectRepository extends MongoRepository<ArticleCollect, String> {
    ArticleCollect findArticleCollectByUserIdAndArticleId(Long userId, String articleId);
    // 查询指定用户收藏的文章
    Page<ArticleCollect> findArticleCollectsByUserIdAndGradeIdOrderByCollectTimeDesc(Long userId, Long gradeId, Pageable pageable);
    Page<ArticleCollect> findArticleCollectsByUserIdOrderByCollectTimeDesc(Long userId, Pageable pageable);
}
